The present invention relates generally to video, and more particularly to a timing system and method for processing video signals.
To create a moving image on a typical video display, every sixtieth of a second, an electron beam traverses the display pixel by pixel in successive horizontal passes from right to left, progressing from top to bottom of the display. Odd-numbered lines are traversed on one scan of the display. Even-numbered lines are traversed on the next scan of the display. By convention, a single scan by the electron beam across either the odd or even lines of the display is referred to as a video field, and two successive scans across both odd-and even-numbered lines on the display are referred to as a video frame, such that two interlaced video fields form a video frame.
A typical National Television Systems Committee (NTSC) standard video frame includes 525 lines, of which approximately 484 are viewable. Lines numbered 1-262.5 contain the odd field, and lines 262.5-525 contain the even field. Typically, the first 21 lines of each field do not include video content, to allow time for the electron beam to travel to the top of the display, and to provide for transmission of data, such as closed captioning, within the video field. The period during which the beam travels to the top of the display is referred to as the vertical blanking interval.
Each second, the electron beam scans approximately 15,734 horizontal lines. At this rapid scan rate, it is crucial that the display remain synchronized with the video signal so that the video information is displayed in precisely the correct location. For this purpose, synchronization pulses are embedded within each video field. At the end of each line, a horizontal sync pulse instructs the electron beam to return to the beginning of the next line. During each vertical blanking interval, a vertical sync pulse instructs the electron beam to travel to the top of the display to begin scanning a new video field. If the timing of these pulses substantially varies from NTSC standards, the resulting picture will be misaligned.
Video signal sources, such as video cassette players, television broadcasts, video cameras, etc., typically transmit video signals according to a locally generated time base. In a video cassette player, for example, the time base is created by the mechanical motion of the playback heads reading video information from the videotape. Each local time base is ideally set to operate at the NTSC standard scanning rate of 29.97 frames per second. However, inherent imperfections in each time base, caused by, for example, internal clock error, stretching of a video tape, or mechanical vibrations within a tape transport mechanism, will result in slightly varying frame rates for each device.
Several timing related picture defects are known to occur in current video systems. First, when a video display initially receives a new video signal or switches from one video source to another, it may take a few moments for the display to synchronize with the time base of the new video signal. During this time, a phenomenon referred to as xe2x80x9cpicture rollxe2x80x9d may occur, where the picture appears to roll rapidly upward on the display. Picture roll is typically viewed when switching between channels on a television set.
In addition, a phenomenon referred to as xe2x80x9cvideo tearingxe2x80x9d occurs where an input video stream is supplied to a video buffer according to one time base, and an output video stream is produced by a video generator from the contents of the video buffer according to another time base. While the time bases may be closely aligned, the above-described inherent imperfections in each time base will result in differences between the frame rates of the input and output video streams. For example, the input stream may supply 1000 frames for every 1004 frames produced in the output stream.
If the video generator attempts to transmit a new field from the video buffer before the input video stream has fully loaded the new field into the buffer, the video generator will transmit the contents of the buffer while it contains only a portion of the new field, and a portion of an old field. The resultant visual effect on the display is that part of the new field and part of the old field are displayed. Tearing can manifest itself as a single broken frame, or can occur in several consecutive frames, appearing as a rapid wiggle in the video picture.
Picture roll and video tearing are common problems in multimedia systems that combine video and computer graphics for simultaneous presentation on a single display. One such multimedia system is the WEBTV system available from WEBTV Networks of Santa Clara, Calif. The WEBTV system includes a set-top box, which typically is configured to display a graphical user interface for accessing email and Internet sites, along with television broadcasts, on a single screen. Though particular reference is made hereafter to set-top boxes for explanatory purposes, it should be understood that the problems associated with combining graphics and video are generally experienced in a wide variety of multimedia systems.
To combine graphics and video, a video buffer within the set-top box typically receives an input video stream from a television broadcast source. A video generator combines this input video stream with computer graphics generated within the set-top box. The video generator produces an output video stream according to a local time base and transmits the output video stream to an associated display. In this manner, the set-top box is able to display television programs while simultaneously displaying graphical information.
Several methods may be used to combine the input television stream and computer graphics. First, the television signal may be unsynchronized with the time base of the set-top box. In this case, the input video signal will be delivered to the video buffer according to the remote time base of the television broadcast, and taken from the video buffer according to the local time base of the video generator within the set-top box. As described above, inevitable variations between the remote and local time bases will result in video tearing. The wiggle effect produced by the tearing is distracting to the user, potentially making the picture difficult to see and the text difficult to read.
To control video tearing, the television broadcast source and the video generator may be synchronized by making one a slave to the time base of the other, or by making both slaves to an external time base, such that the frame rates of the television broadcast and the set-top box match exactly. One common video synchronization standard known in the video industry is the generator locking (genlock) standard. Genlock systems are commonly used in video studios in conjunction with a house sync signal, and can produce extremely accurate synchronization of various video devices.
Syncing a television broadcast source to an individual user""s set-top box, of course, is impractical due to the distance between the user and the television broadcast source, and the multiplicity of users that tune into a given television broadcast. Syncing the video generator of the set-top box to the time base of the television broadcast is a feasible option for eliminating the video tearing problem. However, such an arrangement would cause the entire display of the set-top box, including the computer graphics portion, to experience picture roll when the television channel is changed. Screen-wide picture roll is distracting to the user, and makes the computer graphics portion of the screen difficult to read while changing television channels.
Finally, the set-top box may utilize a device known as a time base corrector to prevent video tearing. A time base corrector typically includes video buffers configured to store two input video frames, and a video generator with an internal time base. The time base corrector generates an output video stream based on the internal time base, and avoids video tearing by sending only the most recent video frame that has bee fully loaded into the buffers to the output stream. If, after displaying a first frame, a second video frame is not completely loaded into a buffer, the time base corrector redisplay the first frame. If two frames have been loaded since the last transmission of an output frame, the time base corrector will drop the oldest frame, and display only the most recent frame.
While the time base corrector does eliminate video tearing, it has the disadvantage of requiring two full frames of video buffer memory, which is unnecessarily costly. In addition, the time base corrector displays video that may be xe2x80x9cjerkyxe2x80x9d due to the fact that frames are periodically dropped and redisplayed to avoid video tearing.
The invention provides a video timing system and method. The system includes a video buffer configured to receive an input video field from an input video stream, a video generator coupled to the video buffer, the video generator being configured to transmit an output video field in an output video stream, and a timer configured to measure a time interval between the input video field and the output video field. The video generator is configured to alter the timing of the output video stream if the time interval is outside a predetermined range. The video generator typically is configured to alter the timing of the output stream after a last viewable line of the output video field.
The method typically includes receiving from an input video stream an input video field in a video buffer, transmitting an output video field from the video buffer to an output video stream, measuring a time interval between a predetermined point on the input video field and a predetermined point on the output video field, determining whether the time interval is outside a predetermined range, and, if so, altering timing of the output video stream. The method typically involves altering timing after a last viewable line of the output video field.